<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<style>

    /* 
        浮动的作用 让块级元素水平排列
        浮动的特点 顶对齐，具备行内块的显示模式,浮动的元素不占有原来的位置
    */
    .box1 {
        width: 200px;
        height: 200px;
        background-color: skyblue;
        float: left;
    }
    .box2 {
        width: 300px;
        height: 300px;
        background-color: orange;
        float: right;
    }
</style>

<body>
    <div class="box1"></div>
    <div class="box2"></div>
</body>

</html>